//
//  StoreRequestManager.h
//  much
//
//  Created by weijunjie on 2019/1/4.
//  Copyright © 2019年 iOS. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "ProvinceModel.h"
#import "StoreAddressModel.h"

NS_ASSUME_NONNULL_BEGIN
@class SearchFilterModel;
@interface MuchStoreRequestManager : NSObject

/**
 商品搜索

 @param filterModel 搜索模型
 */
+ (void)storeSearchWithFilterModel:(SearchFilterModel *)filterModel
                  successBlock:(nullable RequestSuccessAndTotalPage)successBlock
                  failureBlock:(nullable RequestFailed)failureBlock;

/**
 商品详情
 
 @param spuSid 商品spuSid
 */
+ (void)storeDetailInfoWithSpuSid:(NSString *)spuSid
                  successBlock:(nullable RequestSuccess)successBlock
                  failureBlock:(nullable RequestFailed)failureBlock;

/**
 商品详情规格
 
 @param spuSid 商品spuSid
 */
+ (void)storeDetailStandardInfoWithSpuSid:(NSString *)spuSid
                     successBlock:(nullable RequestSuccess)successBlock
                     failureBlock:(nullable RequestFailed)failureBlock;

/**
 预下单

 @param amount 总价
 @param goodsArray 商品数组
 */
+ (void)storeGoodsPreOrderWithAmount:(NSString *)amount
                          goodsArray:(NSArray *)goodsArray
                             successBlock:(nullable RequestSuccess)successBlock
                             failureBlock:(nullable RequestFailed)failureBlock;
/** 获取省份列表 */
+ (void)storeGetProvinceList:(RequestSuccess)successBlock fail:(RequestFailed)failBlock;

/**
 获取城市列表

 @param parentSid 省sid
 */
+ (void)storeGetCityList:(NSString *)parentSid success:(RequestSuccess)successBlock fail:(RequestFailed)failBlock;

/**
 获取市区列表

 @param cityCode 城市code
 */
+ (void)storeGetDistrictList:(NSString *)cityCode success:(RequestSuccess)successBlock fail:(RequestFailed)failBlock;

/** 商城中用户地址列表 */
+ (void)storeGetAddressList:(RequestSuccess)successBlock fail:(RequestFailed)failBlock;

/**
 移除用户地址

 @param sid sid
 */
+ (void)storeDeleteAddress:(NSString *)sid success:(RequestSuccess)successBlock fail:(RequestFailed)failBlock;

/**
 修改用户地址

 @param sid sid
 @param areaSid 区域
 @param address 地址
 @param name 姓名
 @param phone 电话号码
 @param addressDefault 详细地址
 */
+ (void)storeEditAddress:(NSString *)sid areaSid:(NSString *)areaSid address:(NSString *)address name:(NSString *)name phone:(NSString *)phone addressDefault:(BOOL)addressDefault sucess:(RequestSuccess)successBlock fail:(RequestFailed)failBlock;

/**
 保存用户地址

 @param areaSid y区域
 @param address 地址
 @param name 姓名
 @param phone 电话号码
 @param addressDefault 详细地址
 */
+ (void)storeSaveAddress:(NSString *)areaSid address:(NSString *)address name:(NSString *)name phone:(NSString *)phone addressDefault:(BOOL)addressDefault sucess:(RequestSuccess)successBlock fail:(RequestFailed)failBlock;

@end

NS_ASSUME_NONNULL_END
